-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wip/bewest/dev #19
Wip/bewest/dev #19
Conversation
fixed path for trace-axios dependency
Bug found - "var connections = resp.data.data;"
This was not a bug afterall, reverting.
Typo found in "opts.linkUpPatientId;"
… to use shareous2, which does not work.
Align treatments syncing to last glucose for first pass.
In order to share this interface, between external and sidecars, it needs to standardize on being a real date object when present.
This prevents a category of errors the plugin is running internally to Nightscout but has no recent information to generate a reasonable last known basis. This allows minimed to sync treatments data specifically on last treatment data when syncing from within Nightscout. There is a potential issue with using 0 as the default here, as this could create issues duplicating and syncing the largest amount of data that the driver may allow.
Much of the logic here was borrowed from here: A few things to note: several items with different types share the same |
…to wip/bewest/dev
Force Medtronic to log requests from nightscout-connect. Do not allow plausible deniability. Per nightscout/minimed-connect-to-nightscout#46, force putting a second UUID in a header. x-axios-tracing already sets a UUID. This patch correctly uses browser based headers for processing and requesting HTML Forms.
@AndyLow91, I've adjusted to correctly use the browser string for URLs truly expecting a browser. The Nightscout Connect attribution is also included in the browser UA string. Finally, an extra UUID was added based on feedback from nightscout/minimed-connect-to-nightscout#46. Instead of doing the latter, it may prove better to generate 6 - 8 random characters and append that instead. |
Note, the Medtronic implementation does not implement the refresh logic. I'm not sure how the refresh logic is supposed to work, but it could play a role in reducing the need to overflow the rate on calling consent method, as it's probably expected to refresh in production. |
When it's possible to log in, fetching valid data should result in inserting new data to Nightscout. This patch adds needed control flow (returning a promise), as well as corrects datetime handling in order to allow inserting missing information into Nightscout.
If the word Nightscout is present in the UA string, Medtronic EU servers will block the request. This patch moves the software attribution information to the x-powered-by header.
|
x-axios-tracing already implements a uuid in that header, making this one redundant. This patch removes the x-uniq-req header, which does nothing but otherwise complicate the code.
I think this may work for refresh token https://github.com/anguriskit24/CareLinkJavaClient/tree/feature/get-new-auth-token |
Ah, I see they add the |
This patch refreshes existing Carelink session when possible, instead of always creating new sessions. Thanks @sbc2280 for the tip: https://github.com/anguriskit24/CareLinkJavaClient/blob/22defbd961a5092c7ed40f3f64adc0170928df39/src/main/java/info/nightscout/medtronic/carelink/client/CareLinkClient.java#L308-L310 Refreshing the Carelink session involves using the right content-type, as well as adding the relevant locale and country query parameters.
Thanks, @sbc2280. I don't know why, but refreshing the session is so much more satisfying than creating a new one.
|
Dev Branch Nightscout Connect
Minimed Carelink Updates